package com.xiangban.yanglaodajie_platform.controller;

import com.xiangban.yanglaodajie_platform.aop.Permission;
import com.xiangban.yanglaodajie_platform.entity.UserDevice;
import com.xiangban.yanglaodajie_platform.entity.res.ApiResult;
import com.xiangban.yanglaodajie_platform.service.UserDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/userDevice")
public class UserDeviceController {
    @Autowired
    private UserDeviceService userDeviceService;
    @Permission
    @RequestMapping("/insertUserDevice")
    public ApiResult<Object> insertUserDevice(@RequestBody UserDevice userDevice){
        userDeviceService.insertUserDevice(userDevice);
        return ApiResult.newSuccess();
    }

}
